﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.Linq;
using System.ServiceModel.Configuration;
using System.Text;
using System.Windows.Forms;
using VNet.VisiSuite.Common.Resource;
using VNet.VisiSuite.Common.Security;
using VNet.VisiSuite.Service.Contact.Message;
using VNet.VisiSuite.Service.Contact.Message.Base;
using VNet.VisiSuite.Service.Contact.Message.Security;
using VNet.VisiSuite.Service.Proxy;
using VNet.VisiSuite.VisiBoard.BusinessLogic;
using VNet.VisiSuite.VisiBoard.Models;

namespace VNet.VisiSuite.VisiBoard.Providers
{
    public class LocalProvider
    {
        private static LocalUtil _util = new LocalUtil();

        public static void GetLocalCell(object sender, DoWorkEventArgs e)
        {
            var worker = sender as BackgroundWorker;
            e.Result = null;

            if (worker != null && worker.CancellationPending == false)
            {
                e.Result = _util.GetLocalCell();
            }
        }

        public static void SyncDataFromServerToClient(object sender, DoWorkEventArgs e)
        {
            var worker = sender as BackgroundWorker;
            e.Result = null;
            if (worker != null && worker.CancellationPending == false)
            {
                e.Result = _util.SyncDataFromServerToClient(e.Argument as ConfigureResponse);
            }
        }

    }
}
